Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding ability to ignore actuators #133

Merged
merged 2 commits into from
Jul 12, 2023
Merged

Adding ability to ignore actuators #133

merged 2 commits into from
Jul 12, 2023

Conversation

dsanmartim
Copy link
Contributor

Hi Tiago,

I did a quick implementation on this ticket. Can you take a look on the first try and tell me if anything else would be needed?

@dsanmartim dsanmartim assigned dsanmartim and unassigned dsanmartim Jul 11, 2023
@dsanmartim dsanmartim requested a review from tribeiro July 11, 2023 20:21
Copy link
Member

@tribeiro tribeiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the version history and take a look at the inline comments I've made.

I think this can be a new patch release, e.g.; v1.24.2

The CI is failing because of the indentation problem I mention on the schema (line 139).

items:
type: number
enum: [{m1m3_actuator_ids_str}]
default: []
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is line ha the wrong indentation level. It should be one level up

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw it just after opening the PR. Already fixed it.

if config.ignore_actuators:
self.actuators_to_test = list(
filter(
lambda actuator: actuator not in config.ignore_actuators,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lambda functions are not allowed per our development guidelines: https://developer.lsst.io/python/style.html#lambda-should-not-be-used

I would suggest doing something like:

self.actuators_to_test = [actuator_id for actuator_id in self.actuators_to_test if actuator_id not in config.ignore_actuators]

It is more clear and expressive than the implementation here.

Copy link
Member

@tribeiro tribeiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! thanks for the updates! please, squash your commits before merging.

@dsanmartim
Copy link
Contributor Author

Tks for approving it. Merged!

@dsanmartim dsanmartim merged commit 2be5c69 into develop Jul 12, 2023
1 check passed
@dsanmartim dsanmartim deleted the tickets/SITCOM-944 branch July 12, 2023 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants